<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "chat_msg_content".
 *
 * @property string $id 内容ID
 * @property string $chat_id 会话ID
 * @property string $sender 发送人
 * @property int $senderid 发送人ID
 * @property string $content 消息内容
 * @property string $addtime 添加时间
 */
class ChatMsgContent extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'chat_msg_content';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['chat_id', 'sender', 'senderid', 'content', 'addtime'], 'required'],
            [['chat_id', 'senderid', 'addtime'], 'integer'],
            [['sender'], 'string', 'max' => 80],
            [['content'], 'string', 'max' => 1000],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => '内容ID',
            'chat_id' => '会话ID',
            'sender' => '发送人',
            'senderid' => '发送人ID',
            'content' => '消息内容',
            'addtime' => '添加时间',
        ];
    }
}
